package com.um.jdy.app.shop.controller;

import com.um.jdy.app.shop.manager.DiyManager;
import com.um.springboot.starter.orm.entity.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * 购物车
 * @author renjunwei
 * @date 2020/9/21 09:40
 */
@Api(tags = "DIY")
@Validated
@RestController
@RequestMapping("/api/v1/diy/")
public class DiyController {

    @Autowired
    DiyManager diyManager;

    /**
     * 查询DIY首页
     * @return
     */
    @ApiOperation("查询DIY首页")
    @GetMapping("home")
    public Response getHome() {
        return Response.success(diyManager.getHome());
    }
}
